<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'tb-cliente-lufioca-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Campos con <span class="required">*</span> son requeridos.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'codigo'); ?>
		<?php echo $form->textField($model,'codigo',array('size'=>20,'maxlength'=>20,'readonly'=>!$model->isNewRecord)); ?>
		<?php echo $form->error($model,'codigo'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'rif'); ?>
		<?php echo $form->textField($model,'rif',array('size'=>20,'maxlength'=>20))." Ejemplo: J-12345678-0 o V-12345678-0 o E-12345678-0"; ?>
		<?php echo $form->error($model,'rif'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'razonsocial'); ?>
		<?php echo $form->textField($model,'razonsocial',array('size'=>60,'maxlength'=>150)); ?>
		<?php echo $form->error($model,'razonsocial'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'telefono'); ?>
		<?php 
$this->widget('CMaskedTextField', array(
'mask' => '(999)-999.99.99',
'placeholder' => '_',
'completed' => 'function(){alert(1);}',
'model' => $model,
'attribute' => 'telefono',
));
		
		?>
		<?php echo $form->error($model,'telefono'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'direccion'); ?>
		<?php echo $form->textField($model,'direccion',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'direccion'); ?>
	</div>


	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Crear Cliente' : 'Guardar'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->